﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LoadQuery.aspx.cs" Inherits="Danser_AJAXEnabledWebApplication.Query_Popups.LoadQuery" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Select Query</title>
    
    <script language="javascript"> 
    function closePopup()
    {
        window.opener.getLoadQueryRefresh().click();
        return window.close();
    }
    </script>
</head>
<body bgcolor="Lavender">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="loadQueriesScriptManager" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="loadQueriesUpdatePanel" runat="server">
        <ContentTemplate>
        <asp:Panel ID="loadQueriesPanel" runat="server" Width="700px">
        <table style="width:100%;">
            <tr>
                <td>
                    <asp:Label ID="selectQueryLabel" runat="server" Text="Select query to load:" 
                        Font-Bold="True" Font-Names="Arial" Font-Size="12pt" 
                        ForeColor="MidnightBlue"></asp:Label>
                    <asp:UpdateProgress ID="loadQueriesUpdateProgress" runat="server" 
                        AssociatedUpdatePanelID="loadQueriesUpdatePanel" DisplayAfter="300">
                        <ProgressTemplate>
                        <table style="width:100%;">
                            <tr>
                                <td width="20px">
                                    <asp:Image ID="Image1" runat="server" ImageUrl="~/Resourses/Images/info.bmp" />
                                </td>
                                <td>
                                    <asp:Label ID="waitLabel" runat="server" Font-Bold="False" 
                                        Font-Names="Arial" Font-Size="10pt" ForeColor="Black" 
                                        Text="Please wait while executing..."></asp:Label>
                                </td>
                            </tr>
                        </table>
                        </ProgressTemplate>
                    </asp:UpdateProgress>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:GridView ID="queriesGridView" runat="server" AllowPaging="True" 
                        BackColor="LightGray" BorderColor="White" 
                        BorderStyle="Solid" BorderWidth="1px" 
                        EmptyDataText="&lt; No Entries to Display &gt;" PageSize="7" Width="100%" 
                        onrowdatabound="queriesGridView_RowDataBound" 
                        onpageindexchanging="queriesGridView_PageIndexChanging">
                        <RowStyle BorderColor="White" BorderStyle="Solid" BorderWidth="1px" 
                            Font-Names="Arial" HorizontalAlign="Center" 
                            VerticalAlign="Middle" Font-Size="10pt" />
                        <EmptyDataRowStyle CssClass="EmptyRowStyle" HorizontalAlign="Center" 
                            VerticalAlign="Middle" BorderColor="White" BorderStyle="Solid" 
                            BorderWidth="1px" Font-Italic="True" Font-Names="Arial" Font-Size="11pt" />
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:RadioButton ID="rowSelector" runat="server" AutoPostBack="True" 
                                        oncheckedchanged="rowSelector_CheckedChanged" />
                                </ItemTemplate>
                                <ItemStyle Width="30px" />
                            </asp:TemplateField>
                        </Columns>
                        <PagerStyle BackColor="#C0C0FF" BorderColor="White" BorderStyle="Solid" 
                            BorderWidth="1px" Font-Bold="True" Font-Names="Arial" 
                            Font-Size="12pt" ForeColor="MidnightBlue" HorizontalAlign="Center" 
                            VerticalAlign="Middle" />
                        <HeaderStyle BackColor="#C0C0FF" BorderColor="White" BorderStyle="Solid" 
                            BorderWidth="1px" Font-Bold="True" Font-Names="Arial" 
                            Font-Size="12pt" ForeColor="MidnightBlue" HorizontalAlign="Center" 
                            VerticalAlign="Middle" />
                        <AlternatingRowStyle BackColor="Gainsboro" BorderColor="White" 
                            BorderStyle="Solid" BorderWidth="1px" Font-Names="Arial" 
                            Font-Size="10pt" />
                    </asp:GridView>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="selectButton" runat="server" BackColor="MidnightBlue" 
                        BorderColor="#C0C0FF" BorderStyle="Solid" BorderWidth="1px" 
                        Font-Names="Arial" ForeColor="White" 
                        Text="Select" Width="70px" 
                        OnClientClick="return closePopup();"
                        Font-Size="10pt"/>
                    &nbsp;&nbsp;
                    <asp:Button ID="cancelButton" runat="server" BackColor="MidnightBlue" 
                        BorderColor="#C0C0FF" BorderStyle="Solid" BorderWidth="1px" 
                        Font-Names="Arial" Font-Size="10pt" ForeColor="White" 
                        onclientclick="return window.close();" Text="Cancel" Width="70px" />
                </td>
            </tr>
        </table>
    </asp:Panel>
        </ContentTemplate>
        </asp:UpdatePanel>
        
    </form>
</body>
</html>
